<?php
header("Content-type: application/json");
require_once("../src/JQClient.php");


$configs = [
    "client_id" => "backend",
    "client_secret" => "abcde12345",
    "api_base_url" => "http://127.0.0.1:8000/",
    "common_headers" => ["openId", "access_token"],
    "common_params" => ["user_id"],
];
$client = new JQClient($configs);
$client->setDebug(0);
$client->setParameters(["a" => 1, "b" => "中文"]);
$client->setUrl("chapters/manage");
$client->post();

print $client->getResult();

// $client->setParameterType(HttpClient::PARAMETER_TYPE_NORMAL);
//$client->setUrl("chapters/1");
//$client->get();
//
//$client->setUrl("chapters/1");
//$client->delete();
//
//$client->addFile("e:/temp/b.txt", "bb.txt", "file_1");
//$client->setUrl("asset/temp");
//$client->post();